if exists (select 1
            from  sysobjects
           where  id = object_id('bd_view_kq_holidays_time_rowno')
            and   type = 'V')
   drop view bd_view_kq_holidays_time_rowno
go

/*==============================================================*/
/* View: bd_view_kq_holidays_time_rowno                         */
/*==============================================================*/
create view bd_view_kq_holidays_time_rowno as
SELECT id, user_serial, user_dept, time_year, time_month, save_ordinary, save_weekend, owe, vacation_annual, vacation_lactational, rest_total, operate_id, operate_time,
 row_no = ROW_NUMBER() OVER (PARTITION BY user_serial ORDER BY time_year, time_month DESC)
FROM bd_kq_holidays_time
go
